<template>
  <div class="content">
    <div id="table2-1">
      <div class="innertitle" style="margin-bottom: 20px;">
        放射检查类型：
        <el-select
          style="border: 1px solid #DCDFE6; border-radius: 4px; width: 400px;"
          v-model="form1.radiationCheckTypeCode"
          placeholder="请选择"
          @change="submitTestForm(1)"
        >
          <el-option
            v-for="(item, index) in radiationCheckTypeList"
            :label="item.key"
            :value="item.value"
            :key="index"
          ></el-option>
        </el-select>
      </div>

      <div class="innertitle" style="margin-bottom: 20px;">
        <span>核查类别：</span>
        <el-input
          style="border: 1px solid #DCDFE6; border-radius: 4px; width: 200px; margin-right: 20px;"
          v-model="form1.checkTypeName"
          placeholder=""
          data-cusValidate="text"
        ></el-input>
        <span>核查时间：</span>
        <el-date-picker
          style="border: 1px solid #DCDFE6; border-radius: 4px; width: 200px; height: 36px;"
          v-model="form1.checkDate"
          type="date"
          placeholder=""
          format="yyyy-MM-dd"
          value-format="yyyy-MM-dd"
        ></el-date-picker>
      </div>

      <div class="innertitle">
        1.项目概况
      </div>
      <table border="1" cellspacing="0" cellpadding="0" align="center" style="width: 100%;">
        <tr>
          <td style="width: 150px;">单位名称</td>
          <td colspan="5">
            <el-input v-model="form1.organizationName" placeholder="" data-cusValidate="text"></el-input>
            <!-- <el-autocomplete
              style="width: 100%;"
              v-model="form1.organizationName"
              :fetch-suggestions="organizationFetchSuggestions"
              placeholder=""
              value-key="organizationName"
              placement="bottom"
              :popper-append-to-body="false"
              @select="(data) => {

              }"
            ></el-autocomplete> -->
          </td>
        </tr>
        <tr>
          <td>建设地址</td>
          <td colspan="5">
            <el-input v-model="form1.address" placeholder="" data-cusValidate="text"></el-input>
          </td>
        </tr>
        <tr>
          <td>报告编号</td>
          <td>
            <el-input v-model="form1.reportNumber" placeholder="" data-cusValidate="text"></el-input>
          </td>
          <td>联系人</td>
          <td>
            <el-input v-model="form1.contactsName" placeholder="" data-cusValidate="text"></el-input>
          </td>
          <td>电话</td>
          <td>
            <el-input v-model="form1.telephone" placeholder=""></el-input>
          </td>
        </tr>
      </table>
      <div class="innertitle">
        2.辐射源项
      </div>
      <table border="1" cellspacing="0" cellpadding="0" align="center" style="width: 100%;">
        <tr>
          <td style="width: 150px;">设备名称</td>
          <td>
            <el-input v-model="form1.equipmentName" placeholder="" data-cusValidate="text"></el-input>
          </td>
          <td>型号</td>
          <td>
            <el-input v-model="form1.equipmentModel" placeholder="" data-cusValidate="text"></el-input>
          </td>
        </tr>
        <tr>
          <td>编号</td>
          <td>
            <el-input v-model="form1.equipmentNumber" placeholder="" data-cusValidate="text"></el-input>
          </td>
          <td>厂家</td>
          <td>
            <el-input v-model="form1.manufacturer" placeholder="" data-cusValidate="text"></el-input>
          </td>
        </tr>
        <tr>
          <td>额定参数</td>
          <td>
            <el-input class="input-line" v-model="form1.tubeVoltage" placeholder=""></el-input>kV、
            <el-input class="input-line" v-model="form1.tubeCurrent" placeholder=""></el-input>mA
          </td>
          <td>所在场所</td>
          <td>
            <el-input v-model="form1.place" placeholder="" data-cusValidate="text"></el-input>
          </td>
        </tr>
      </table>
      <div class="innertitle">
        3.工作场所
      </div>
      <table border="1" cellspacing="0" cellpadding="0" align="center" style="width: 100%;">
        <tr>
          <td style="width: 150px;">机房名称</td>
          <td colspan="4">
            <el-input v-model="form1.computerRoomName" placeholder="" data-cusValidate="text"></el-input>
          </td>
          <td style="width: 150px;">曝光操作位置</td>
          <td colspan="4">
            <el-input v-model="form1.exposureOperationPosition" placeholder="" data-cusValidate="text"></el-input>
          </td>
        </tr>
        <tr>
          <td>排风设施</td>
          <td colspan="7">
            <el-radio-group v-model="form1.exhaustFacilities">
              <el-radio :label="0">排风扇</el-radio>
              <el-radio :label="1">中央空调</el-radio>
              <el-radio :label="2">新风系统</el-radio>
              <el-radio :label="3">手术室净化系统</el-radio>
              <el-radio :label="4">无</el-radio>
            </el-radio-group>
          </td>
        </tr>
        <tr>
          <td>排风设施状态</td>
          <td colspan="4">
            <el-radio-group v-model="form1.theStatusOfExhaustFacilities">
              <el-radio :label="0">功能正常</el-radio>
              <el-radio :label="1">故障</el-radio>
            </el-radio-group>
          </td>
          <td>观察设施</td>
          <td colspan="4">
            <el-radio-group v-model="form1.observationFacilities">
              <el-radio :label="0">观察窗</el-radio>
              <el-radio :label="1">监控</el-radio>
            </el-radio-group>
          </td>
        </tr>
        <tr>
          <td rowspan="2">受检者门</td>
          <td>平开门</td>
          <td colspan="2">
            <el-radio-group v-model="form1.examineSwingDoor">
              <el-radio :label="0">单扇</el-radio>
              <el-radio :label="1">双扇</el-radio>
            </el-radio-group>
          </td>
          <td colspan="4">
            自动闭门装置：
            <el-radio-group v-model="form1.examineAutoCloseDoor">
              <el-radio :label="1">有</el-radio>
              <el-radio :label="0">无</el-radio>
            </el-radio-group>
          </td>
        </tr>
        <tr>
          <td>推拉门</td>
          <td colspan="2">
            <el-radio-group v-model="form1.examineSlidingDoor">
              <el-radio :label="0">电动</el-radio>
              <el-radio :label="1">手动</el-radio>
            </el-radio-group>
          </td>
          <td colspan="2">
            延时闭门：
            <el-radio-group v-model="form1.examineDelayCloseDoor">
              <el-radio :label="1">有</el-radio>
              <el-radio :label="0">无</el-radio>
            </el-radio-group>
          </td>
          <td colspan="2">
            防夹装置：
            <el-radio-group v-model="form1.examineAntiPinchDevice">
              <el-radio :label="1">有</el-radio>
              <el-radio :label="0">无</el-radio>
            </el-radio-group>
          </td>
        </tr>
        <tr>
          <td rowspan="2">
            工作人员门<br />
            （<el-checkbox v-model="form1.sameExamineeDoor">同受检者门</el-checkbox> ）
          </td>
          <td>平开门</td>
          <td colspan="2">
            <el-radio-group v-model="form1.staffSwingDoor">
              <el-radio :label="0">单扇</el-radio>
              <el-radio :label="1">双扇</el-radio>
            </el-radio-group>
          </td>
          <td colspan="4">
            自动闭门装置：
            <el-radio-group v-model="form1.staffAutoCloseDoor">
              <el-radio :label="1">有</el-radio>
              <el-radio :label="0">无</el-radio>
            </el-radio-group>
          </td>
        </tr>
        <tr>
          <td>推拉门</td>
          <td colspan="2">
            <el-radio-group v-model="form1.staffSlidingDoor">
              <el-radio :label="0">电动</el-radio>
              <el-radio :label="1">手动</el-radio>
            </el-radio-group>
          </td>
          <td colspan="2">
            延时闭门：
            <el-radio-group v-model="form1.staffDelayCloseDoor">
              <el-radio :label="1">有</el-radio>
              <el-radio :label="0">无</el-radio>
            </el-radio-group>
          </td>
          <td colspan="2">
            防夹装置：
            <el-radio-group v-model="form1.staffAntiPinchDevice">
              <el-radio :label="1">有</el-radio>
              <el-radio :label="0">无</el-radio>
            </el-radio-group>
          </td>
        </tr>
        <tr>
          <td rowspan="2">
            <el-input class="input-line" v-model="form1.otherDoor" placeholder="" data-cusValidate="text"></el-input>门
            <br />
            （<el-radio-group v-model="form1.otherDoorFlag">
              <el-radio :label="1">有</el-radio>
              <el-radio :label="0">无</el-radio>
            </el-radio-group> ）
          </td>
          <td>平开门</td>
          <td colspan="2">
            <el-radio-group v-model="form1.otherSwingDoor">
              <el-radio :label="0">单扇</el-radio>
              <el-radio :label="1">双扇</el-radio>
            </el-radio-group>
          </td>
          <td colspan="4">
            自动闭门装置：
            <el-radio-group v-model="form1.otherAutoCloseDoor">
              <el-radio :label="1">有</el-radio>
              <el-radio :label="0">无</el-radio>
            </el-radio-group>
          </td>
        </tr>
        <tr>
          <td>推拉门</td>
          <td colspan="2">
            <el-radio-group v-model="form1.otherSlidingDoor">
              <el-radio :label="0">电动</el-radio>
              <el-radio :label="1">手动</el-radio>
            </el-radio-group>
          </td>
          <td colspan="2">
            延时闭门：
            <el-radio-group v-model="form1.otherDelayCloseDoor">
              <el-radio :label="1">有</el-radio>
              <el-radio :label="0">无</el-radio>
            </el-radio-group>
          </td>
          <td colspan="2">
            防夹装置：
            <el-radio-group v-model="form1.otherAntiPinchDevice">
              <el-radio :label="1">有</el-radio>
              <el-radio :label="0">无</el-radio>
            </el-radio-group>
          </td>
        </tr>
        <tr>
          <td>机房内</td>
          <td colspan="7">
            堆放与该设备诊断无关的杂物：
            <el-radio-group v-model="form1.sundriesFlag">
              <el-radio :label="1">有</el-radio>
              <el-radio :label="0">无</el-radio>
            </el-radio-group>
          </td>
        </tr>
      </table>
      <div class="innertitle">
        4.警示设施
      </div>
      <table border="1" cellspacing="0" cellpadding="0" align="center" style="width: 100%;">
        <tr>
          <td style="width: 200px;">警告标志位置</td>
          <td colspan="3">
            <el-radio-group v-model="form1.warningSignLocation">
              <el-radio :label="0">受检者门上</el-radio>
              <el-radio :label="1">
                工作人员门上
                (<el-input class="input-line" style="width: 300px !important;" v-model="form1.otherWarningSignLocation" placeholder="" data-cusValidate="text"></el-input>)
              </el-radio>
            </el-radio-group>
          </td>
        </tr>
        <tr>
          <td rowspan="2">工作状态指示灯</td>
          <td colspan="3">
            <el-radio-group v-model="form1.workingLocation">
              <el-radio :label="0">受检者门上方</el-radio>
              <el-radio :label="1">
                工作人员门上方
                (<el-input class="input-line" style="width: 300px !important;" v-model="form1.otherWorkingLocation" placeholder="" data-cusValidate="text"></el-input>)
              </el-radio>
            </el-radio-group>
          </td>
        </tr>
        <tr>
          <td>警示文字</td>
          <td colspan="2">
            <el-checkbox v-model="form1.workingWarningFlag">射线有害 灯亮勿入</el-checkbox>
            <span style="margin-left: 20px;">其他：</span>
            (<el-input class="input-line" style="width: 300px !important;" v-model="form1.otherWorkingWarningText" placeholder="" data-cusValidate="text"></el-input>)
          </td>
        </tr>
        <tr>
          <td rowspan="2">联动装置</td>
          <td colspan="3">
            <el-radio-group v-model="form1.interlockingDevice">
              <el-radio :label="1">照明三联动</el-radio>
              <el-radio :label="2">低压三联动</el-radio>
              <el-radio :label="3">门灯二联动</el-radio>
            </el-radio-group>

            <span style="margin-left: 20px;">联动的门：</span>
            (<el-input class="input-line" style="width: 300px !important;" v-model="form1.linkedDoorStr" placeholder="" data-cusValidate="text"></el-input>)
          </td>
        </tr>
        <tr>
          <td colspan="3">
            <span>联动的门：</span>
            <el-radio-group v-model="form1.linkedDoor">
              <el-radio :label="0">受检者门</el-radio>
              <el-radio :label="1">工作人员门</el-radio>
            </el-radio-group>

            <span style="margin-left: 20px;">其他：</span>
            (<el-input class="input-line" style="width: 300px !important;" v-model="form1.otherLinkedDoor" placeholder="" data-cusValidate="text"></el-input>)
          </td>
        </tr>
        <tr>
          <td>放射防护注意事项</td>
          <td colspan="3">
            <el-radio-group v-model="form1.attentionLocation">
              <el-radio :label="0">受检者门外</el-radio>
              <el-radio :label="1">候诊区</el-radio>
            </el-radio-group>

            <span style="margin-left: 20px;"></span>
            (<el-input class="input-line" style="width: 300px !important;" v-model="form1.mattersNeedingAttention" placeholder="" data-cusValidate="text"></el-input>)
          </td>
        </tr>
      </table>
      <div class="innertitle">
        5.防护用具
      </div>
      <div class="innertitle">
        5.1 工作人员防护
      </div>
      <table border="1" cellspacing="0" cellpadding="0" align="center" style="width: 100%;">
        <tr>
          <td style="width: 100px;">种类</td>
          <td>铅帽</td>
          <td>铅眼镜</td>
          <td>铅颈套</td>
          <td>铅围裙</td>
          <td>铅手套</td>
          <td>铅悬挂防护屏</td>
          <td>铅防护吊帘</td>
          <td>床侧防护帘</td>
          <td>床侧防护屏</td>
          <td>铅防护屏风</td>
          <td>移动铅防护屏风</td>
        </tr>
        <tr>
          <td>数量</td>
          <td>
            <el-input v-model="form1.workingNum1" placeholder="" />
          </td>
          <td>
            <el-input v-model="form1.workingNum2" placeholder="" />
          </td>
          <td>
            <el-input v-model="form1.workingNum3" placeholder="" />
          </td>
          <td>
            <el-input v-model="form1.workingNum4" placeholder="" />
          </td>
          <td>
            <el-input v-model="form1.workingNum5" placeholder="" />
          </td>
          <td>
            <el-input v-model="form1.workingNum6" placeholder="" />
          </td>
          <td>
            <el-input v-model="form1.workingNum7" placeholder="" />
          </td>
          <td>
            <el-input v-model="form1.workingNum8" placeholder="" />
          </td>
          <td>
            <el-input v-model="form1.workingNum9" placeholder="" />
          </td>
          <td>
            <el-input v-model="form1.workingNum10" placeholder="" />
          </td>
          <td>
            <el-input v-model="form1.workingNum11" placeholder="" />
          </td>
        </tr>
        <tr>
          <td>铅当量</td>
          <td>
            <el-input v-model="form1.workingEquivalent1" placeholder="" />
          </td>
          <td>
            <el-input v-model="form1.workingEquivalent2" placeholder="" />
          </td>
          <td>
            <el-input v-model="form1.workingEquivalent3" placeholder="" />
          </td>
          <td>
            <el-input v-model="form1.workingEquivalent4" placeholder="" />
          </td>
          <td>
            <el-input v-model="form1.workingEquivalent5" placeholder="" />
          </td>
          <td>
            <el-input v-model="form1.workingEquivalent6" placeholder="" />
          </td>
          <td>
            <el-input v-model="form1.workingEquivalent7" placeholder="" />
          </td>
          <td>
            <el-input v-model="form1.workingEquivalent8" placeholder="" />
          </td>
          <td>
            <el-input v-model="form1.workingEquivalent9" placeholder="" />
          </td>
          <td>
            <el-input v-model="form1.workingEquivalent10" placeholder="" />
          </td>
          <td>
            <el-input v-model="form1.workingEquivalent11" placeholder="" />
          </td>
        </tr>
        <tr>
          <td>备注</td>
          <td colspan="11">
            <el-input v-model="form1.workingRemark" placeholder="" data-cusValidate="text" />
          </td>
        </tr>
      </table>
      <div class="innertitle">
        5.2 患者、受检者和陪检者防护
      </div>
      <table border="1" cellspacing="0" cellpadding="0" align="center" style="width: 100%;">
        <tr>
          <td style="width: 100px;">种类</td>
          <td>铅帽</td>
          <td>铅橡胶颈套</td>
          <td>大领铅颈套</td>
          <td>铅围裙</td>
          <td>铅方巾</td>
          <td>铅三角巾</td>
          <td>连体式铅衣</td>
          <td>分体式铅衣</td>
          <td>可调防护窗口的立位防护屏</td>
          <td>固定特殊受检者体位的各种设备</td>
        </tr>
        <tr>
          <td>数量</td>
          <td>
            <el-input v-model="form1.examineNum1" placeholder="" />
          </td>
          <td>
            <el-input v-model="form1.examineNum2" placeholder="" />
          </td>
          <td>
            <el-input v-model="form1.examineNum3" placeholder="" />
          </td>
          <td>
            <el-input v-model="form1.examineNum4" placeholder="" />
          </td>
          <td>
            <el-input v-model="form1.examineNum5" placeholder="" />
          </td>
          <td>
            <el-input v-model="form1.examineNum6" placeholder="" />
          </td>
          <td>
            <el-input v-model="form1.examineNum7" placeholder="" />
          </td>
          <td>
            <el-input v-model="form1.examineNum8" placeholder="" />
          </td>
          <td>
            <el-input v-model="form1.examineNum9" placeholder="" />
          </td>
          <td>
            <el-input v-model="form1.examineNum10" placeholder="" />
          </td>
        </tr>
        <tr>
          <td>铅当量</td>
          <td>
            <el-input v-model="form1.examineEquivalent1" placeholder="" />
          </td>
          <td>
            <el-input v-model="form1.examineEquivalent2" placeholder="" />
          </td>
          <td>
            <el-input v-model="form1.examineEquivalent3" placeholder="" />
          </td>
          <td>
            <el-input v-model="form1.examineEquivalent4" placeholder="" />
          </td>
          <td>
            <el-input v-model="form1.examineEquivalent5" placeholder="" />
          </td>
          <td>
            <el-input v-model="form1.examineEquivalent6" placeholder="" />
          </td>
          <td>
            <el-input v-model="form1.examineEquivalent7" placeholder="" />
          </td>
          <td>
            <el-input v-model="form1.examineEquivalent8" placeholder="" />
          </td>
          <td>
            <el-input v-model="form1.examineEquivalent9" placeholder="" />
          </td>
          <td>
            <el-input v-model="form1.examineEquivalent10" placeholder="" />
          </td>
        </tr>
        <tr>
          <td>备注</td>
          <td colspan="10">
            <el-input v-model="form1.examineRemark" placeholder="" data-cusValidate="text" />
          </td>
        </tr>
      </table>
      <div class="innertitle">
        6.机房平面布局
      </div>
      <table border="1" cellspacing="0" cellpadding="0" align="center" style="width: 100%;">
        <tr>
          <td>有效使用面积区域</td>
          <td colspan="3">
            长：
            <el-input class="input-line" style="width: 150px !important;" v-model="form1.regionLong" placeholder="" />
            宽：
            <el-input class="input-line" style="width: 150px !important;" v-model="form1.regionWidth" placeholder="" />
            面积：
            <el-input class="input-line" style="width: 150px !important;" v-model="form1.regionArea" placeholder="" />
          </td>
        </tr>
        <tr>
          <td>墙体内嵌结构</td>
          <td>
            <el-checkbox v-model="form1.embeddedInTheWallFlag">无</el-checkbox>
            <span style="margin-left: 20px;">数量：</span>
            <el-input class="input-line" style="width: 150px !important;" v-model="form1.embeddedInTheWallNum" placeholder="" />
          </td>
          <td>
            柱子及不规则处
          </td>
          <td>
            <el-checkbox v-model="form1.irregularArea">无</el-checkbox>
            <span style="margin-left: 20px;">数量：</span>
            <el-input class="input-line" style="width: 150px !important;" v-model="form1.irregularAreaNum" placeholder="" />
          </td>
        </tr>
        <tr>
          <td>机房上方</td>
          <td>
            <el-input v-model="form1.aboveTheComputerRoom" placeholder="" data-cusValidate="text" />
          </td>
          <td>机房下方</td>
          <td>
            <el-input v-model="form1.belowTheComputerRoom" placeholder="" data-cusValidate="text" />
          </td>
        </tr>
      </table>
      <div class="innertitle">
        7.备注
      </div>
      <el-input type="textarea" v-model="form1.remark" placeholder="" data-cusValidate="text" @blur="submitTestForm(1)"></el-input>

      <div class="innertitle">
        CBCT室防护设施核查
      </div>
      <table border="1" cellspacing="0" cellpadding="0" align="center" style="width: 100%;">
        <tr>
          <td>序号</td>
          <td>核查内容</td>
          <td>核查结果及建议</td>
        </tr>
        <tr>
          <td>1</td>
          <td>机房应设有观察窗或摄像监控装置，其设置的位置应便于观察到受检者状态及防护门开闭情况</td>
          <td>
            <el-autocomplete
              data-cusValidate="text"
              v-model="form1.result1"
              :fetch-suggestions="(queryString, cb) => {
                cb([
                  { value: '是' },
                  { value: '有且正常工作' },
                  { value: '有且规范' },
                  { value: '否' },
                ])
              }"
              placeholder=""
              :popper-append-to-body="false"
              @select="submitTestForm(1)"
            ></el-autocomplete>
          </td>
        </tr>
        <tr>
          <td>2</td>
          <td>机房内不应堆放与该设备诊断工作无关的杂物</td>
          <td>
            <el-autocomplete
              data-cusValidate="text"
              v-model="form1.result2"
              :fetch-suggestions="(queryString, cb) => {
                cb([
                  { value: '是' },
                  { value: '有且正常工作' },
                  { value: '有且规范' },
                  { value: '否' },
                ])
              }"
              placeholder=""
              :popper-append-to-body="false"
              @select="submitTestForm(1)"
            ></el-autocomplete>
          </td>
        </tr>
        <tr>
          <td>3</td>
          <td>机房应设置动力通风装置，并保持良好的通风</td>
          <td>
            <el-autocomplete
              data-cusValidate="text"
              v-model="form1.result3"
              :fetch-suggestions="(queryString, cb) => {
                cb([
                  { value: '是' },
                  { value: '有且正常工作' },
                  { value: '有且规范' },
                  { value: '否' },
                ])
              }"
              placeholder=""
              :popper-append-to-body="false"
              @select="submitTestForm(1)"
            ></el-autocomplete>
          </td>
        </tr>
        <tr>
          <td>4</td>
          <td>机房门外应有电离辐射警告标志；机房门上方应有醒目的工作状态指示灯，灯箱上应设置如“射线有害、灯亮勿入”的可视警示语句；候诊区应设置放射防护注意事项告知栏</td>
          <td>
            <el-autocomplete
              data-cusValidate="text"
              v-model="form1.result4"
              :fetch-suggestions="(queryString, cb) => {
                cb([
                  { value: '是' },
                  { value: '有且正常工作' },
                  { value: '有且规范' },
                  { value: '否' },
                ])
              }"
              placeholder=""
              :popper-append-to-body="false"
              @select="submitTestForm(1)"
            ></el-autocomplete>
          </td>
        </tr>
        <tr>
          <td>5</td>
          <td>平开机房门应有自动闭门装置；推拉式机房门应设有曝光时关闭机房门的管理措施；工作状态指示灯能与机房门有效关联</td>
          <td>
            <el-autocomplete
              data-cusValidate="text"
              v-model="form1.result5"
              :fetch-suggestions="(queryString, cb) => {
                cb([
                  { value: '是' },
                  { value: '有且正常工作' },
                  { value: '有且规范' },
                  { value: '否' },
                ])
              }"
              placeholder=""
              :popper-append-to-body="false"
              @select="submitTestForm(1)"
            ></el-autocomplete>
          </td>
        </tr>
        <tr>
          <td>6</td>
          <td>电动推拉门宜设置防夹装置</td>
          <td>
            <el-autocomplete
              data-cusValidate="text"
              v-model="form1.result6"
              :fetch-suggestions="(queryString, cb) => {
                cb([
                  { value: '是' },
                  { value: '有且正常工作' },
                  { value: '有且规范' },
                  { value: '否' },
                ])
              }"
              placeholder=""
              :popper-append-to-body="false"
              @select="submitTestForm(1)"
            ></el-autocomplete>
          </td>
        </tr>
      </table>

      <div class="innertitle">
        CBCT室防护用品配置核查
      </div>
      <table border="1" cellspacing="0" cellpadding="0" align="center" style="width: 100%;">
        <tr>
          <td style="width: 100px;" rowspan="3">放射核查类型</td>
          <td class="result" colspan="5">
            <el-input v-model="form1.radiationCheckTypeName" placeholder="" data-cusValidate="text" disabled />
          </td>
        </tr>
        <tr>
          <td colspan="2">工作人员</td>
          <td colspan="2">受检者</td>
          <td rowspan="2">陪检者</td>
        </tr>
        <tr>
          <td>个人防护用品</td>
          <td>辅助防护设施</td>
          <td>个人防护用品</td>
          <td>辅助防护设施</td>
        </tr>
        <tr>
          <td>应当配置</td>
          <td>
            <el-input
              type="textarea"
              v-model="form1.staffSuppliesShould"
              placeholder=""
              :autosize="{ minRows: 3, maxRows: 10 }"
              data-cusValidate="text"
              @blur="submitTestForm(1)"
            ></el-input>
          </td>
          <td>
            <el-input
              type="textarea"
              v-model="form1.staffFacilitiesShould"
              placeholder=""
              :autosize="{ minRows: 3, maxRows: 10 }"
              data-cusValidate="text"
              @blur="submitTestForm(1)"
            ></el-input>
          </td>
          <td>
            <el-input
              type="textarea"
              v-model="form1.examineeSuppliesShould"
              placeholder=""
              :autosize="{ minRows: 3, maxRows: 10 }"
              data-cusValidate="text"
              @blur="submitTestForm(1)"
            ></el-input>
          </td>
          <td>
            <el-input
              type="textarea"
              v-model="form1.examineeFacilitiesShould"
              placeholder=""
              :autosize="{ minRows: 3, maxRows: 10 }"
              data-cusValidate="text"
              @blur="submitTestForm(1)"
            ></el-input>
          </td>
          <td>
            <el-input
              type="textarea"
              v-model="form1.accompanyShould"
              placeholder=""
              :autosize="{ minRows: 3, maxRows: 10 }"
              data-cusValidate="text"
              @blur="submitTestForm(1)"
            ></el-input>
          </td>
        </tr>
        <tr>
          <td>实际配置</td>
          <td>
            <el-input
              type="textarea"
              v-model="form1.staffSuppliesReal"
              placeholder=""
              :autosize="{ minRows: 3, maxRows: 10 }"
              data-cusValidate="text"
              @blur="submitTestForm(1)"
            ></el-input>
          </td>
          <td>
            <el-input
              type="textarea"
              v-model="form1.staffFacilitiesReal"
              placeholder=""
              :autosize="{ minRows: 3, maxRows: 10 }"
              data-cusValidate="text"
              @blur="submitTestForm(1)"
            ></el-input>
          </td>
          <td>
            <el-input
              type="textarea"
              v-model="form1.examineeSuppliesReal"
              placeholder=""
              :autosize="{ minRows: 3, maxRows: 10 }"
              data-cusValidate="text"
              @blur="submitTestForm(1)"
            ></el-input>
          </td>
          <td>
            <el-input
              type="textarea"
              v-model="form1.examineeFacilitiesReal"
              placeholder=""
              :autosize="{ minRows: 3, maxRows: 10 }"
              data-cusValidate="text"
              @blur="submitTestForm(1)"
            ></el-input>
          </td>
          <td>
            <el-input
              type="textarea"
              v-model="form1.accompanyReal"
              placeholder=""
              :autosize="{ minRows: 3, maxRows: 10 }"
              data-cusValidate="text"
              @blur="submitTestForm(1)"
            ></el-input>
          </td>
        </tr>
      </table>

      <div class="innertitle">
        建议
      </div>
      <el-input
        type="textarea"
        v-model="form1.suggestion"
        placeholder=""
        :autosize="{ minRows: 3, maxRows: 10 }"
        data-cusValidate="text"
        @blur="submitTestForm(1)"
      ></el-input>

      <div class="innertitle">
        核查结论
      </div>
      <el-input
        type="textarea"
        v-model="form1.conclusion"
        placeholder=""
        :autosize="{ minRows: 3, maxRows: 10 }"
        data-cusValidate="text"
        @blur="submitTestForm(1)"
      ></el-input>
    </div>
  </div>
</template>

<script>
import { getInfoById9999, getRadiationCheckTypeList, updateProtectionCheckInfo } from '@/api/testItem/item9999'
import { entrustOrganizationListing2 } from '@/api/person/entrustOrganization'

export default {
  name: "testItem9999",
  props: {
    // tab栏
    activeNameEquipment: {
      type: String,
      default: "0",
    },
    // 基本信息数据
    basicForm: {
      type: Object,
      default: () => {
        return {}
      },
    },
  },
  data() {
    return {
      resultId: null,
      radiationCheckTypeList: [],
      form1: {},
    };
  },
  created() {
    getRadiationCheckTypeList().then(res => {
      this.radiationCheckTypeList = res.data || [];
    }).catch((error) => {});
  },
  watch: {
    activeNameEquipment: {
      handler(val) {
        let _this = this;
        this.$nextTick(() => {
          // 获取详情
          const isProtectionCheck1 = this.basicForm.isProtectionCheck;
          if (isProtectionCheck1 == 1) {
            this.resultId = this.basicForm.resultId;
          } else {
            this.resultId = this.basicForm.protectionDetectionVo?.taskDetectionEquipmentResultId;
          }
          getInfoById9999(this.resultId).then(response => {
            this.form1 = response.data || {};
          }).catch((response) => {
            console.log("catch-->getInfoById06", response);
            this.$emit("loadingchange", true);
          });
          // 绑定请求
          let itemsLength = 1;
          for (let index = 0; index < itemsLength; index++) {

            let tableInputs = Array.from(document.getElementById(`table2-${index + 1}`).getElementsByTagName("input")).filter(item => {
              return !item.readOnly
            });
            for (let i = 0; i < tableInputs.length; i++) {
              this.bind(tableInputs[i], () => {
                this.submitTestForm(index + 1)
              })
            }
          }
        })
      },
      deep: true,
      immediate: true
    },
  },
  methods: {
    // 客户名称输入建议数据
    organizationFetchSuggestions(queryString, callback) {
      const queryParams = {
        pageNum: 1,
        pageSize: 10,
        organizationName: queryString,
      }
      entrustOrganizationListing2(queryParams).then(res => {
        callback(res.rows || [])
      }).catch(err => {})
    },
    // 机房防护设施调查记录-9999
    submitTestForm(index) {
      console.log("提交检测项", index);
      this.$emit("loadingchange", true);
      this[`form${index}`].resultId = this.resultId;
      switch (index) {
        case 1:
          updateProtectionCheckInfo(this.form1).then((response) => {
            this.form1 = response.data || {};
            this.$emit("loadingchange", false);
          })
          break;
      }
    },
  },
};
</script>

<style lang="scss" scoped>
@import '../content.scss';
</style>
